<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑医生信息库</title>
    <%@ include file="../../common/meta.jsp" %>
    <%@ include file="../../common/common-body.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <script src="${ctx}/js/plugins/jquery.ajaxfileupload-2.1.js"></script>
    <script src="${ctx}/js/imageview/jquery.photo.gallery.js?t=${now}"></script>
    <script src="${ctx}/js/plugins/validate/jquery.validate.custom.js?t=20181024"></script>
    <script>
        var oneBasicDoctorInfo = ${oneBasicDoctorInfo};
        var searchInfo = ${searchInfo};
        var imgSrcDefault="${ctx}/images/main/default.jpg";
        var type = '${type}';
        var sexMap = '${sexMap}';
        var docProfessionMap = '${docProfessionMap}';
        var mediLevelList = '${mediLevelList}';
        var certificateTypeList = '${certificateTypeList}';
    </script>
</head>
<body class="gray-bg">
<div class="myContent">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>专家信息</h5>
                </div>
                <div class="ibox-title-2">
                    <h5><i class="fa fa-file-text"></i>  基本信息</h5>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="mainForm" novalidate="novalidate">
                        <input type="hidden" id="id" name="id" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.id : ''}">
                        <input type="hidden" id="docCode" name="docCode" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docCode : ''}">
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>专家名称：</label>
                            <div class="col-sm-3">
                                <input type="text" id="docName" name="docName" required class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docName : ''}" maxlength="8">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red"></span>专家性别：</label>
                            <div class="col-sm-3">
                                <select type="text" id="docGender" name="docGender" class="form-control">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${sexMap}" var="item">
                                        <option value="${item.key}" ${not empty oneBasicDoctorInfo && oneBasicDoctorInfo.docGender == item.key? 'selected' : '' } >${item.value}</option>
                                    </c:forEach>
                                </select>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>专家类型：</label>
                            <div class="col-sm-3">
                                <select type="text" required id="docProfession" name="docProfession" class="form-control">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${docProfessionMap}" var="item">
                                        <option value="${item.key}" ${not empty oneBasicDoctorInfo && oneBasicDoctorInfo.docProfession == item.key? 'selected' : '' } >${item.value}</option>
                                    </c:forEach>
                                </select>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>专家职称：</label>
                            <div class="col-sm-3">
                                <select type="text" required id="docMediLevel" name="docMediLevel" class="form-control">
                                    <option value="">--请选择--</option>
                                    <c:if test="${not empty mediLevelList}">
                                        <c:forEach items="${mediLevelList}" var="item">
                                            <option value="${item.dictCode}" ${not empty oneBasicDoctorInfo && oneBasicDoctorInfo.docMediLevel == item.dictCode? 'selected' : '' }>${item.dictName}</option>
                                        </c:forEach>
                                    </c:if>
                                </select>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>主执业机构：</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" id="orgCode" required name="orgCode" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.orgCode : ''}">
                                    <input type="text" id="orgName" required placeholder="输入执业机构" name="orgName" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.orgName : ''}" class="form-control" maxlength="20">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red"></span>头衔：</label>
                            <div class="col-sm-3">
                                <input type="text" id="docTitle" name="docTitle" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docTitle : ''}" maxlength="100">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>一级科室：</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" id="pDeptCode" required name="pDeptCode" value="${not empty oneBasicDoctorInfo && not empty oneBasicDoctorInfo.cDeptCode &&
                                    empty oneBasicDoctorInfo.pDeptCode?oneBasicDoctorInfo.cDeptCode : oneBasicDoctorInfo.pDeptCode}">
                                    <input type="text" id="pDeptName" placeholder="输入一级科室" required name="pDeptName" value="${not empty oneBasicDoctorInfo && not empty oneBasicDoctorInfo.cDeptName &&
                                            empty oneBasicDoctorInfo.pDeptName?oneBasicDoctorInfo.cDeptName : oneBasicDoctorInfo.pDeptName}" class="form-control" maxlength="20">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red"></span>二级科室：</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" id="cDeptCode" name="cDeptCode" value="${not empty oneBasicDoctorInfo && not empty oneBasicDoctorInfo.cDeptCode &&
                                    not empty oneBasicDoctorInfo.pDeptCode?oneBasicDoctorInfo.cDeptCode : ''}">
                                    <input type="text" id="cDeptName" placeholder="输入二级科室" name="cDeptName" value="${not empty oneBasicDoctorInfo && not empty oneBasicDoctorInfo.cDeptName &&
                                    not empty oneBasicDoctorInfo.pDeptName?oneBasicDoctorInfo.cDeptName : ''}" class="form-control" maxlength="20">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>排序：</label>
                            <div class="col-sm-3">
                                <input type="text" id="sortNum" name="sortNum" class="form-control" value="${not empty oneBasicDoctorInfo ?oneBasicDoctorInfo.sortNum:''}" maxlength="9" isPInteger="true">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>服务商：</label>
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <input type="hidden" id="isvPid" name="isvPid" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.isvPid : ''}">
                                    <input type="text" id="isvPidName" required placeholder="输入服务商" name="isvName" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.isvName : ''}" class="form-control" maxlength="20">
                                    <div class="input-group-btn">
                                        <button type="button" class="btn btn-default dropdown-toggle mySearchBtn" data-toggle="dropdown">
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                        </ul>
                                    </div>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>原专家编码：</label>
                            <div class="col-sm-3">
                                <input type="text" id="code" name="code" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.code : ''}" maxlength="64">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red"></span>从业年限：</label>
                            <div class="col-sm-3">
                                <input type="text" id="seniority" name="seniority" class="form-control" placeholder="输入从业年限" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.seniority : ''}" maxlength="3" isPInteger="true">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>主页url：</label>
                            <div class="col-sm-8">
                                <input type="text" id="docWebsite" name="docWebsite" class="form-control" placeholder="输入专家主页、专家介绍等链接，客户端推荐专家、搜索结果对应链接" value="${not empty oneBasicDoctorInfo ?oneBasicDoctorInfo.docWebsite:''}" maxlength="200">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>擅长：</label>
                            <div class="col-sm-8">
                                <textarea type="text" id="docAdept" placeholder="多个擅长用英文半角逗号分隔" name="docAdept" class="form-control" style="height: 80px; resize: none;" maxlength="500">${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docAdept : ''}</textarea>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>个人简介：</label>
                            <div class="col-sm-8">
                                <textarea type="text" id="docIntroduction" placeholder="" name="docIntroduction" class="form-control" style="height: 80px; resize: none;" maxlength="1000">${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docIntroduction : ''}</textarea>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>头像：</label>
                            <div class="col-sm-8">
                                <div class="form-item-image">
                                    <%--<input type="hidden" id="docLogoHidden" name="docLogo" value="${not empty oneBasicDoctorInfo ?oneBasicDoctorInfo.docLogo:''}">--%>
                                    <img style="float:left;" id="coverUrlImg1" onclick='$.openPhotoGallery(this)' src="${not empty oneBasicDoctorInfo&&not empty oneBasicDoctorInfo.docLogo?oneBasicDoctorInfo.docLogo:ctx.concat('/images/main/default.jpg')}" alt="80*80，10k以内" class="img-rounded win-img gallery-pic">
                                    <label style="float: left" class="ui-upload">浏览<input type="file" id="coverUrlFile1" name="coverUrlFile1" style="display: none;" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" onchange="onPreviewImg(this, 'coverUrlImg1')"></label>
                                    <label style="float: left;margin-left: 20px">图片尺寸要求：80*80px，40k以内</label>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>头像url：</label>
                            <div class="col-sm-8">
                                <input type="hidden" id="docLogoHidden" placeholder="以头像url为准" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docLogo : ''}" maxlength="500">
                                <input type="text" id="docLogo" name="docLogo" placeholder="以头像url为准" class="form-control" value="" onblur="onPreviewUrl(this, 'coverUrlImg1')" maxlength="500">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>

                        <div class="ibox-title-2">
                            <h5><i class="fa fa-file-text"></i>  资质信息</h5>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>手机号：</label>
                            <div class="col-sm-3">
                                <input type="text" id="docMobile" name="docMobile" class="form-control" isPhoneNo="true" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.docMobile : ''}" maxlength="11">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                            <label class="col-sm-2 control-label"><span style="color: red"></span>身份证号：</label>
                            <div class="col-sm-3">
                                <input type="text" id="identityCard" name="identityCard" isIdCardNo="true" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.identityCard : ''}" maxlength="18">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>证书类型：</label>
                            <div class="col-sm-3">
                                <select type="text" id="certificateType" name="certificateType" class="form-control">
                                    <option value="">--请选择--</option>
                                    <c:if test="${not empty certificateTypeList}">
                                        <c:forEach items="${certificateTypeList}" var="item">
                                            <option value="${item.dictCode}" ${not empty oneBasicDoctorInfo && oneBasicDoctorInfo.certificateType == item.dictCode? 'selected' : '' }>${item.dictName}</option>
                                        </c:forEach>
                                    </c:if>
                                </select>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>证书编号：</label>
                            <div class="col-sm-8">
                                <input type="text" id="certificateNo" name="certificateNo" class="form-control" value="${not empty oneBasicDoctorInfo?oneBasicDoctorInfo.certificateNo : ''}" maxlength="20">
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new">
                            <label class="col-sm-2 control-label"><span style="color: red"></span>证书照片（支持上传3张）：</label>
                            <div class="col-sm-8">
                                <div class="form-item-image">
                                    <%--<input type="hidden" id="docLogoHidden" name="docLogo" value="${not empty oneBasicDoctorInfo ?oneBasicDoctorInfo.docLogo:''}">--%>
                                    <img style="float:left;" id="coverUrlImg2" onclick='$.openPhotoGallery(this)' src="${ctx.concat('/images/main/default.jpg')}" alt="60k以内" class="img-rounded win-img gallery-pic">
                                    <label style="float: left" class="ui-upload">浏览<input type="file" id="coverUrlFile2" name="coverUrlFile2" style="display: none;" onchange="onPreviewImg(this, 'coverUrlImg2')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"></label>
                                    <img style="float:left;margin-left: 20px" id="coverUrlImg3" onclick='$.openPhotoGallery(this)' src="${ctx.concat('/images/main/default.jpg')}" alt="60k以内" class="img-rounded win-img gallery-pic">
                                    <label style="float: left" class="ui-upload">浏览<input type="file" id="coverUrlFile3" name="coverUrlFile3" style="display: none;" onchange="onPreviewImg(this, 'coverUrlImg3')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"></label>
                                    <img style="float:left;;margin-left: 20px" id="coverUrlImg4" onclick='$.openPhotoGallery(this)' src="${ctx.concat('/images/main/default.jpg')}" alt="60k以内" class="img-rounded win-img gallery-pic">
                                    <label style="float: left" class="ui-upload">浏览<input type="file" id="coverUrlFile4" name="coverUrlFile4" style="display: none;" onchange="onPreviewImg(this, 'coverUrlImg4')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"></label>
                                    <label style="float: left;margin-left: 20px;word-break: normal">图片尺寸要求：60k以内</label>
                                </div>
                                <span class="help-block m-b-none tip"></span>
                            </div>
                        </div>
                        <div class="form-group form-group-new" id="_btnDiv">
                            <div class="col-sm-4 col-sm-offset-4">
                                <c:if test="${type!='info'}">
                                    <input type="button" class="btn btn-primary" id="submitBtn" onclick="doSave()" value="保存">
                                </c:if>
                                <input type="button" class="btn btn-white" id="cancelBtn" onclick="doBack()" value="返回">
                            </div>
                        </div>
                    </form>
                    <%--<form id="searchForm">
                        <input type="hidden"  name="name" value="${not empty searchForm.name?searchForm.name: ''}">
                        <input type="hidden"  name="brand" value="${not empty searchForm.brand?searchForm.brand: ''}">
                        <input type="hidden"  name="provinceCode" value="${not empty searchForm.provinceCode?searchForm.provinceCode: ''}">
                        <input type="hidden"  name="cityCode" value="${not empty searchForm.cityCode?searchForm.cityCode: ''}">
                        <input type="hidden"  name="typeEnumValue" value="${not empty searchForm.cityCode?searchForm.typeEnumValue: ''}">
                        <input type="hidden"  name="pageNo" value="${not empty searchForm.pageNo?searchForm.pageNo : ''}">
                        <input type="hidden"  name="pageSize" value="${not empty searchForm.pageSize?searchForm.pageSize : ''}">
                    </form>--%>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctx}/js/plugins/validate/jquery.validate.custom.js?v=20180427"></script>
<script src="${ctx}/js/doctor/win/editBasicDoctorInfoMgr.js?t=${now}"></script>
<script src="${ctx}/js/common/upLoadingFileSize.js?t=${now}"></script>
<c:if test="${type=='info'}">
    <script src="${ctx}/js/common/myDisabled.js?t=${now}"></script>
</c:if>
</body>
</html>
